package com.steel.yfmall.cloud.assistant.api.stock;

import com.steel.yfmall.cloud.assistant.bean.param.ZgOrderParamBean;
import com.steel.yfmall.cloud.assistant.bean.param.zg.APIParaWarrantyBean;
import com.steel.yfmall.cloud.assistant.bean.result.*;
import com.steel.yfmall.cloud.components.utils.base.APIMsgBean;
import com.steel.yfmall.cloud.components.utils.base.Pages;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @version 1.0
 * @ClassName: ZgOrderService
 * @author: TQ
 * @Description: DOTO
 * @Date Create in 14:51 2020/11/19
 **/
@FeignClient(value = "YFMALL-ASSISTANT-SERVICE-PROVIDER")
@Component
public interface ZgOrderService {

    /**
     * 合同预览
     *
     * @param zgOrderParamBean 订单号	masterOrderSn
     * @return
     */
    @RequestMapping(value = "orderShowPdf")
    APIMsgBean<ContractInfoBean> orderShowPdf(ZgOrderParamBean zgOrderParamBean);

    /**
     * SO01-订单建立
     *
     * @param zgOrderParamBean 订单号	orderNo
     * @return
     */
    @RequestMapping(value = "createPushOrder")
    APIMsgBean<ContractInfoBean> createPushOrder(ZgOrderParamBean zgOrderParamBean);

    /**
     * SO03-订单确认通知
     *
     * @param zgOrderParamBean 订单号	orderNo
     *                         操作人	operator
     * @return
     */
    @RequestMapping(value = "addZgOrderConfirm")
    APIMsgBean<Boolean> addZgOrderConfirm(ZgOrderParamBean zgOrderParamBean);

    /**
     * 取消订单
     *
     * @param zgOrderParamBean 订单号	orderNo
     *                         操作人	operator
     * @return
     */
    @RequestMapping(value = "cannotZgOrder")
    APIMsgBean<Boolean> cannotZgOrder(ZgOrderParamBean zgOrderParamBean);

//    /**
//     * 删除订单
//     *
//     * @param zgOrderParamBean 订单号	orderNo
//     *                         操作人	operator
//     * @return
//     */
//    @RequestMapping(valucancelOrdere = "deleteZgOrder")
//    APIMsgBean<Boolean> deleteZgOrder(ZgOrderParamBean zgOrderParamBean);

    /**
     * 通过订单号与客户编号，查询结算结果
     *
     * @param zgOrderParamBean 订单合同号	orderNo
     *                         客户编号		custNO
     * @return
     */
    @RequestMapping(value = "SSKEC007")
    APIMsgBean<SSKEC007Bean> SSKEC007(ZgOrderParamBean zgOrderParamBean);

    /**
     * SO12-打印订单合同模板
     *
     * @param zgOrderParamBean 订单号	orderNo
     * @return
     */
    @RequestMapping(value = "saveContractAddress")
    APIMsgBean<ContractAddressBean> saveContractAddress(ZgOrderParamBean zgOrderParamBean);

    /**
     * 通过订单号获取应付单
     * 获取整理 AV05 进行展示。仅 返回 电商单 数据。
     *
     * @param zgOrderParamBean 拼接后的合同号-orderNos
     * @return AV05（应收凭证）的集合
     */
    @RequestMapping(value = "getCanInvoiceListByOrderNo")
    APIMsgBean<AVSystemInterfaceResultBean> getCanInvoiceListByOrderNo(ZgOrderParamBean zgOrderParamBean);

//    /**
//     * 通过账套别与客户编号获取应付单
//     *
//     * @param zgOrderParamBean
//     * @return
//     */
//    @RequestMapping(value = "getCanInvoiceList")
//    APIMsgBean<ContractAddressBean> getCanInvoiceList(ZgOrderParamBean zgOrderParamBean);

    /**
     * 设置开明细票OR汇总票
     *
     * @param zgOrderParamBean 账套别		compId
     *                         应收凭单号	arNos
     *                         明细or汇总	detailOrSum 	D为明细/S为汇总
     * @return
     */
    @RequestMapping(value = "setDetailOrSumData")
    APIMsgBean<AVSystemInterfaceResultBean> setDetailOrSumData(ZgOrderParamBean zgOrderParamBean);

    /**
     * 申请确认
     *
     * @param zgOrderParamBean 应收凭单号	avNoQry
     *                         账套别		compIdQry
     *                         发票类型		mergeQry
     * @return
     */
    @RequestMapping(value = "applyInvoiceOk")
    APIMsgBean<AVSystemInterfaceResultBean> applyInvoiceOk(ZgOrderParamBean zgOrderParamBean);

    /**
     * 修改发票接收人资料
     *
     * @param zgOrderParamBean 应收凭单号		avNoQry
     *                         发票收件人姓名	receiverName
     *                         发票收件人电话	receiverPhone
     *                         发票收件人地址	sendAddr
     *                         发票类型			invoiceLimitAmtType
     *                         开票备注			memo
     * @return
     */
    @RequestMapping(value = "custNoDataUpdate")
    APIMsgBean<AVSystemInterfaceResultBean> custNoDataUpdate(ZgOrderParamBean zgOrderParamBean);

    /**
     * 开票接口整合
     *
     * @param zgOrderParamBean 订单号	orderNo
     * @return
     */
    @RequestMapping(value = "issueInvoice")
    APIMsgBean<AVSystemInterfaceResultBean> issueInvoice(ZgOrderParamBean zgOrderParamBean);

    /**
     * AR03-查询运费余额
     *
     * @param zgOrderParamBean 客户编号	CUSTNO
     *                         运费担当	TRANSWAY
     * @return 是否查询成功    ISSUCCESS
     * 客户编号	custNo
     * 客户中文名称	custName
     * 日期时间戳印	timestamp
     * 结果总共几笔资料	total
     * 运费余额	result
     * 结果讯息	msg
     */
    @RequestMapping(value = "searchFreightBalance")
    APIMsgBean<FreightBalanceBean> searchFreightBalance(ZgOrderParamBean zgOrderParamBean);

    /**
     * 获取质保书信息
     * @Title: getWarrantyFromZg
     * @Description: (这里用一句话描述这个方法的作用)
     * @Param apiParaBean 参数说明
     * @return com.steel.yfmall.cloud.components.utils.base.APIMsgBean<com.steel.yfmall.cloud.components.utils.base.Pages<com.steel.yfmall.cloud.assistant.bean.result.APIResultWarrantyBean>>    返回类型
     * @author yuchaohua
     * @date 2021/2/20 15:05
     */
    @RequestMapping(value = "getWarrantyFromZg")
    APIMsgBean<Pages<APIResultWarrantyBean>> getWarrantyFromZg(APIParaWarrantyBean apiParaBean);
}
